'use strict';
const db = uniCloud.database();
exports.main = async (event, context) => {
  let {userID} = event;
  let finishProjectResult = await db.collection('projects').where({
	  relevanceUserID:userID
  }).get();
  
  if(finishProjectResult.affectedDocs !== 0 || finishProjectResult.data.length !== 0){
	  return{
		  status:0,
		  data:finishProjectResult.data
	  }
  } else {
	  return{
		  status:1,
		  msg:"没有数据"
	  }
  }
  
  return {
	  status:-1,
	  msg:"稍后重试"
  }
};
